package com.ark.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author dyz
 * @date 2025/4/11 15:50
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("shopping_cart")
@Schema(description = "购物车实体类")
public class ShoppingCart implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;

    //名称
    @Schema(description = "名称")
    private String name;

    //用户id
    @Schema(description = "用户id")
    private Long userId;

    //菜品id
    @Schema(description = "菜品id")
    private Long dishId;

    //套餐id
    @Schema(description = "套餐id")
    private Long setmealId;

    //口味
    @Schema(description = "口味")
    private String dishFlavor;

    //数量
    @Schema(description = "数量")
    private Integer number;

    //金额
    @Schema(description = "金额")
    private BigDecimal amount;

    //图片
    @Schema(description = "图片")
    private String image;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;
}
